package mythread.a11threadsage3;

public class ThreadDemo {
    /*
    需求：
        某电影院目前正在上映国产大片，供有100张票，而他有3个窗口卖票，请设计一个程序模拟该电影院卖票
     */
    public static void main(String[] args) {
        Ticket ticket = new Ticket();

        Thread t1 = new Thread(ticket);
        Thread t2 = new Thread(ticket);
        Thread t3 = new Thread(ticket);

        t1.setName("窗口一");
        t2.setName("窗口二");
        t3.setName("窗口三");

        t1.start();
        t2.start();
        t3.start();
    }

}
